package cn.erp.app.service;

import java.util.List;

import cn.erp.common.model.SvcBaseinfo;

public class BaseInfoService {
	public static BaseInfoService me = new BaseInfoService();
	private BaseInfoService(){}
	public List<SvcBaseinfo> getAllMateriel() {
		return SvcBaseinfo.dao.find("select * from svc_baseinfo where category='RawMaterial'");
	}
	
	public List<SvcBaseinfo> getAllMaterielWithOutPro() {
		return SvcBaseinfo.dao.find("select * from svc_baseinfo where category='RawMaterial' and paramId!='001'");
	}
	
	public List<SvcBaseinfo> getAllWareHouse() {
		return SvcBaseinfo.dao.find("select * from svc_baseinfo where category='WareHouse'");
	}
	
	public SvcBaseinfo getMaterielByParamId(String paramId) {
		return SvcBaseinfo.dao.findFirst("select * from svc_baseinfo where category='RawMaterial' and paramId=?",paramId);
	}
	
	
}
